<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.min.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" v-focus>
		</div>
		<script>
			Vue.directive('focus',{
				inserted : function (el) { 
					//聚焦元素
					el.focus();
				}
			})
			var app=new Vue({
				el:'#app'
			})
		</script>
	</body>
</html>
